import { createRouter, createWebHashHistory } from 'vue-router';
import Home from '../components/Home.vue';
import Login from '../components/Login.vue';
import Welcome from '../components/Welcome.vue';
import Test from '../components/Test.vue';

const routes = [
  {
    name: 'home',
    path: '/',
    component: Home,
    redirect: '/welcome',
    children: [
      {
        name: 'welcome',
        path: '/welcome',
        component: Welcome,
      },
      {
        name: 'login',
        path: '/login',
        component: Login,
      },
    ],
  },
  {
    name: 'test',
    path: '/test',
    component: Test,
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
